﻿<%@ Page Language="C#" MasterPageFile="~/Admin/UserPage.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TaggerApp.Admin.Pages.Devices.Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">   
    <div align="center" >

    <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1" RepeatLayout="Flow" ShowFooter="False" ShowHeader="False" CellPadding="5">
        <ItemTemplate>
           <h2><asp:Label ID="productNameLabel" runat="server" Text='<%# Eval("productName") %>' /></h2>
            <asp:Image ID="productImage" runat="server" ImageUrl='<%#Eval("productImgURL")%>' CssClass="img-polaroid" Height="400px" Width="600px"  visible='<%# Eval("productImgURL") != DBNull.Value %>' />
          <br />
            <br />
          <table class="table table-hover table-bordered">
           <tr runat="server" visible='<%# Eval("productCPU") != DBNull.Value %>'>
                <td><strong>CPU:</strong></td> 
                <td><asp:Label ID="productCPULabel" runat="server" Text='<%# Eval("productCPU") %>' /></td>
           </tr>
           <tr runat="server" visible='<%# Eval("productOS") != DBNull.Value %>'>
                <td><strong>Operating System:</strong></td> 
                <td><asp:Label ID="productOSLabel" runat="server" Text='<%# Eval("productOS") %>' /></td> 
            
           </tr>
            <tr runat="server" visible='<%# Eval("productMemory") != DBNull.Value %>'>
                <td><strong> Memory:</strong></td> 
                <td> <asp:Label ID="productMemoryLabel" runat="server" Text='<%# Eval("productMemory") %>' /></td>
                 </tr>
          <tr runat="server" visible='<%# Eval("productHD") != DBNull.Value %>'>
                <td><strong>Storage:</strong></td> 
                <td> <asp:Label ID="productHDLabel" runat="server" Text='<%# Eval("productHD") %>' /></td> 
            
          </tr>
          <tr runat="server" visible='<%# Eval("productDisplayInfo") != DBNull.Value %>'>
                <td><strong>Display:</strong></td> 
                <td><asp:Label ID="productDisplayInfoLabel" runat="server" Text='<%# Eval("productDisplayInfo") %>' /></td> 
            
          </tr>
         <tr runat="server" visible='<%# Eval("productMedDrive") != DBNull.Value %>'> 
                <td> <strong>Media Drive:</strong></td> 
             <td><asp:Label ID="productMedDriveLabel" runat="server" Text='<%# Eval("productMedDrive") %>' /></td> 
            
         </tr>
         <tr runat="server" visible='<%# Eval("productPorts") != DBNull.Value %>'>
                <td> <strong>Ports:</strong></td> 
                <td> <asp:Label ID="productPortsLabel" runat="server" Text='<%# Eval("productPorts") %>' /></td> 
            
         </tr>
         <tr runat="server" visible='<%# Eval("productNetwork") != DBNull.Value %>'>
                <td>  <strong>Network:</strong></td> 
                <td>  <asp:Label ID="productNetworkLabel" runat="server" Text='<%# Eval("productNetwork") %>' /></td>   
         </tr>
         <tr runat="server" visible='<%# Eval("productCameraInfo") != DBNull.Value %>'>
                <td>  <strong>Camera:</strong></td> 
           <td> <asp:Label ID="productCameraInfoLabel" runat="server" Text='<%# Eval("productCameraInfo") %>' /></td> 
            
         </tr>
          <tr runat="server" visible='<%# Eval("productBatteryInfo") != DBNull.Value %>'>
                <td> <strong>Battery:</strong></td> 
                <td>  <asp:Label ID="productBatteryInfoLabel" runat="server" Text='<%# Eval("productBatteryInfo") %>' /></td> 
            
          </tr>
        <tr runat="server" visible='<%# Eval("productDescription") != DBNull.Value %>'>
                <td> <strong>Description:</strong></td> 
                <td><asp:Label ID="productDescriptionLabel" runat="server" Text='<%# Eval("productDescription") %>' /></td> 
            
        </tr>
        <tr runat="server" visible='<%# Eval("productMfgLink") != DBNull.Value %>'>
          <td ><strong> Manufacture Link:</strong></td> 
            <td><a id="productMfgLinkLabel" runat="server"  target="_blank" href='<%# Eval("productMfgLink") %>'><%# Eval("productMfgLink") %></a></td> 
          </tr>
            <tr runat="server" visible='<%# Eval("productVideoURL") != DBNull.Value %>'>
                <td>Preview:</td>
                <td><video src='<%#Eval("productVideoURL") %>' height="400px" width="600px" controls="controls" ></video></td>
            </tr>
       </table>
         </div>
        </ItemTemplate>
    </asp:DataList>

 <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT productName, productMfgLink,productCPU, productOS, productMemory, productHD, productMedDrive, productPorts, productNetwork, productCameraInfo, productBatteryInfo, productDisplayInfo, productDescription, productImgURL, productVideoURL FROM tblProducts WHERE (productGUID = @productGUID)">
        <SelectParameters>
            <asp:QueryStringParameter Name="productGUID" QueryStringField="id" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    </div>
</asp:Content>
